<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 5.2.0">

  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha256-wiz7ZSCn/btzhjKDQBms9Hx4sSeUYsDrTLg7roPstac=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"example.com","root":"/","images":"/images","scheme":"Gemini","darkmode":false,"version":"8.19.2","exturl":false,"sidebar":{"position":"left","width_expanded":320,"width_dual_column":240,"display":"post","padding":18,"offset":12},"copycode":{"enable":false,"style":null},"fold":{"enable":false,"height":500},"bookmark":{"enable":false,"color":"#222","save":"auto"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"Searching...","empty":"We didn't find any results for the search: ${query}","hits_time":"${hits} results found in ${time} ms","hits":"${hits} results found"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>

    <meta property="og:type" content="article">
<meta property="og:title" content="CMake笔记">
<meta property="og:url" content="http://example.com/2024/04/19/CMake%E7%AC%94%E8%AE%B0/index.html">
<meta property="og:site_name" content="LittleBlackDot">
<meta property="og:locale" content="en_US">
<meta property="article:published_time" content="2024-04-19T14:59:34.000Z">
<meta property="article:modified_time" content="2024-04-23T15:01:48.496Z">
<meta property="article:author" content="LittleBlackDot">
<meta name="twitter:card" content="summary">


<link rel="canonical" href="http://example.com/2024/04/19/CMake%E7%AC%94%E8%AE%B0/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"en","comments":true,"permalink":"http://example.com/2024/04/19/CMake%E7%AC%94%E8%AE%B0/","path":"2024/04/19/CMake笔记/","title":"CMake笔记"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>CMake笔记 | LittleBlackDot</title>
  








  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<link rel="alternate" href="/atom.xml" title="LittleBlackDot" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <div class="column">
      <header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="Toggle navigation bar" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">LittleBlackDot</p>
      <i class="logo-line"></i>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger" aria-label="Search" role="button">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>Home</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>Archives</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>Search
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="Searching..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</header>
        
  
  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          Table of Contents
        </li>
        <li class="sidebar-nav-overview">
          Overview
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#cmake%E5%B8%B8%E7%94%A8%E6%8C%87%E4%BB%A4"><span class="nav-number">1.</span> <span class="nav-text">CMake常用指令</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#cmake_minimum_required---%E6%8C%87%E5%AE%9Acmake%E7%9A%84%E6%9C%80%E5%B0%8F%E7%89%88%E6%9C%AC%E8%A6%81%E6%B1%82"><span class="nav-number">1.0.1.</span> <span class="nav-text">cmake_minimum_required
- 指定CMake的最小版本要求</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#project---%E5%AE%9A%E4%B9%89%E5%B7%A5%E7%A8%8B%E5%90%8D%E7%A7%B0%E5%B9%B6%E5%8F%AF%E6%8C%87%E5%AE%9A%E5%B7%A5%E7%A8%8B%E6%94%AF%E6%8C%81%E7%9A%84%E8%AF%AD%E8%A8%80"><span class="nav-number">1.0.2.</span> <span class="nav-text">project -
定义工程名称，并可指定工程支持的语言</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#set--%E6%98%BE%E7%A4%BA%E5%AE%9A%E4%B9%89%E5%8F%98%E9%87%8F"><span class="nav-number">1.0.3.</span> <span class="nav-text">set -显示定义变量</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#include_directories--%E5%90%91%E5%B7%A5%E7%A8%8B%E6%B7%BB%E5%8A%A0%E5%A4%9A%E4%B8%AA%E7%89%B9%E5%AE%9A%E7%9A%84%E5%BA%93%E6%96%87%E4%BB%B6%E6%90%9C%E7%B4%A2%E8%B7%AF%E5%BE%84"><span class="nav-number">1.0.4.</span> <span class="nav-text">include_directories
-向工程添加多个特定的库文件搜索路径</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#link_directories--%E5%90%91%E5%B7%A5%E7%A8%8B%E6%B7%BB%E5%8A%A0%E5%A4%9A%E4%B8%AA%E7%89%B9%E5%AE%9A%E7%9A%84%E5%BA%93%E6%96%87%E4%BB%B6%E6%90%9C%E7%B4%A2%E8%B7%AF%E5%BE%84"><span class="nav-number">1.0.5.</span> <span class="nav-text">link_directories
-向工程添加多个特定的库文件搜索路径</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#add_library--%E7%94%9F%E6%88%90%E5%BA%93%E6%96%87%E4%BB%B6"><span class="nav-number">1.0.6.</span> <span class="nav-text">add_library -生成库文件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#add_compile_options--%E6%B7%BB%E5%8A%A0%E7%BC%96%E8%AF%91%E9%80%89%E9%A1%B9"><span class="nav-number">1.0.7.</span> <span class="nav-text">add_compile_options
-添加编译选项</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#add_exectuable--%E7%94%9F%E6%88%90%E5%8F%AF%E6%89%A7%E8%A1%8C%E6%96%87%E4%BB%B6"><span class="nav-number">1.0.8.</span> <span class="nav-text">add_exectuable
-生成可执行文件</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#target_link_libraries--%E4%B8%BAtarget%E6%B7%BB%E5%8A%A0%E9%9C%80%E8%A6%81%E9%93%BE%E6%8E%A5%E7%9A%84%E5%85%B1%E4%BA%AB%E5%BA%93"><span class="nav-number">1.0.9.</span> <span class="nav-text">target_link_libraries
-为target添加需要链接的共享库</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#add_subdirectory--%E5%90%91%E5%BD%93%E5%89%8D%E5%B7%A5%E7%A8%8B%E6%B7%BB%E5%8A%A0%E5%AD%98%E6%94%BE%E6%BA%90%E6%96%87%E4%BB%B6%E7%9A%84%E5%AD%90%E7%9B%AE%E5%BD%95%E5%B9%B6%E5%8F%AF%E4%BB%A5%E6%8C%87%E5%AE%9A%E4%B8%AD%E9%97%B4%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%92%8C%E7%9B%AE%E6%A0%87%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%AD%98%E6%94%BE%E7%9A%84%E4%BD%8D%E7%BD%AE"><span class="nav-number">1.0.10.</span> <span class="nav-text">add_subdirectory
-向当前工程添加存放源文件的子目录，并可以指定中间二进制和目标二进制存放的位置</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#aux_source_directory--%E5%8F%91%E7%8E%B0%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95%E4%B8%8B%E6%89%80%E6%9C%89%E6%BA%90%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%B9%B6%E5%B0%86%E5%88%97%E8%A1%A8%E5%AD%98%E5%82%A8%E5%9C%A8%E4%B8%80%E4%B8%AA%E5%8F%98%E9%87%8F%E4%B8%AD%E8%BF%99%E4%B8%AA%E6%8C%87%E4%BB%A4%E4%B8%B4%E6%97%B6%E8%A2%AB%E7%94%A8%E6%9D%A5%E8%87%AA%E5%8A%A8%E6%9E%84%E5%BB%BA%E6%BA%90%E6%96%87%E4%BB%B6%E5%88%97%E8%A1%A8"><span class="nav-number">1.0.11.</span> <span class="nav-text">aux_source_directory
-发现一个目录下所有源代码文件并将列表存储在一个变量中，这个指令临时被用来自动构建源文件列表</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#cmake%E5%B8%B8%E7%94%A8%E5%8F%98%E9%87%8F"><span class="nav-number">2.</span> <span class="nav-text">CMake常用变量</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="LittleBlackDot"
      src="/images/head.jpg">
  <p class="site-author-name" itemprop="name">LittleBlackDot</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">11</span>
          <span class="site-state-item-name">posts</span>
        </a>
      </div>
  </nav>
</div>

        </div>
      </div>
    </div>

    
  </aside>


    </div>

    <div class="main-inner post posts-expand">


  



<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="en">
    <link itemprop="mainEntityOfPage" href="http://example.com/2024/04/19/CMake%E7%AC%94%E8%AE%B0/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/head.jpg">
      <meta itemprop="name" content="LittleBlackDot">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="LittleBlackDot">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="CMake笔记 | LittleBlackDot">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          CMake笔记
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">Posted on</span>

      <time title="Created: 2024-04-19 22:59:34" itemprop="dateCreated datePublished" datetime="2024-04-19T22:59:34+08:00">2024-04-19</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar-check"></i>
      </span>
      <span class="post-meta-item-text">Edited on</span>
      <time title="Modified: 2024-04-23 23:01:48" itemprop="dateModified" datetime="2024-04-23T23:01:48+08:00">2024-04-23</time>
    </span>

  
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody"><p> </p>
<a id="more"></a>
<p>平时项目中会涉及一些的CMake脚本的修改,但都是需要改的地方去现查现或者参考已经写好的部分,在开始系统的看一些入门要点,然后记录一下</p>
<h2 id="cmake常用指令">CMake常用指令</h2>
<ul>
<li><h4 id="cmake_minimum_required---指定cmake的最小版本要求">cmake_minimum_required
- 指定CMake的最小版本要求</h4>
<ul>
<li><p>语法: <strong>cmake_minimum_required(VERSION versionNumber
[FATAL_ERROR])</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#cmake最小版本要求3.0.1</span><br><span class="line">cmake_minimum_required(VERSION 3.0.1)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="project---定义工程名称并可指定工程支持的语言">project -
定义工程名称，并可指定工程支持的语言</h4>
<ul>
<li><p>语法：<strong>project(projectName [CXX] [C] [JAVA])</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#指定工程名为XXController</span><br><span class="line">project(XXController)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="set--显示定义变量">set -显示定义变量</h4>
<ul>
<li><p>语法：<strong>set(var [value] [cache type docstring
[force]])</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#定义SRC变量， 其值为main.cpp test.cpp</span><br><span class="line">set(SRC main.cpp test.cpp)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="include_directories--向工程添加多个特定的库文件搜索路径">include_directories
-向工程添加多个特定的库文件搜索路径</h4>
<ul>
<li><p>语法：<strong>inclide_directories([AFTER|BEFOR] [SYSTEM] dir1
dir2 ...)</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#将 &#x2F;usr&#x2F;include&#x2F;myincludeFolder 和 .&#x2F;include 添加到头文件搜索路径</span><br><span class="line">include_directories(&#x2F;usr&#x2F;include&#x2F;myincludeFolder .&#x2F;include)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="link_directories--向工程添加多个特定的库文件搜索路径">link_directories
-向工程添加多个特定的库文件搜索路径</h4>
<ul>
<li><p>语法：<strong>link_directories(dir1 dir2 ...)</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#将&#x2F;usr&#x2F;lib&#x2F;mylibFolder和.&#x2F;lib添加到库文件搜索路径</span><br><span class="line">link_directories(&#x2F;usr&#x2F;lib&#x2F;mylibFolder .&#x2F;lib)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="add_library--生成库文件">add_library -生成库文件</h4>
<ul>
<li><p>语法：<strong>add_library(libname [SHARED|STATIC|MODULE]
[EXCLUDE_FROM_ALL] source1 source2 ...)</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#通过变量 SRC 生成 libHello.so 库</span><br><span class="line">add_libaray(libHello SHARED $&#123;SRC&#125;)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="add_compile_options--添加编译选项">add_compile_options
-添加编译选项</h4>
<ul>
<li><p>语法：<strong>add_compile_options(&lt;option&gt;
...)</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#添加编译选项 -Wall -std&#x3D;c++11 -o2</span><br><span class="line">add_compile_options(-Wall -std&#x3D;c++11 -o2)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="add_exectuable--生成可执行文件">add_exectuable
-生成可执行文件</h4>
<ul>
<li><p>语法：<strong>add_exectuable(exeName source1 source2
...)</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#编译main.cpp 生成可执行文件</span><br><span class="line">add_exectuable(main main.cpp)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="target_link_libraries--为target添加需要链接的共享库">target_link_libraries
-为target添加需要链接的共享库</h4>
<ul>
<li><p>语法：<strong>target_link_libraries(target library1&lt;debug |
optimized&gt; ...)</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#将hello动态库文件链接到可执行文件main</span><br><span class="line">target_link_libraries(main hello)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="add_subdirectory--向当前工程添加存放源文件的子目录并可以指定中间二进制和目标二进制存放的位置">add_subdirectory
-向当前工程添加存放源文件的子目录，并可以指定中间二进制和目标二进制存放的位置</h4>
<ul>
<li><p>语法：<strong>add_subdirectory(sourceDir [binaryDir]
[EXCLUDE_FROM_ALL])</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#添加src子目录</span><br><span class="line">add_subdirectory(src)</span><br></pre></td></tr></table></figure></li>
</ul></li>
<li><h4 id="aux_source_directory--发现一个目录下所有源代码文件并将列表存储在一个变量中这个指令临时被用来自动构建源文件列表">aux_source_directory
-发现一个目录下所有源代码文件并将列表存储在一个变量中，这个指令临时被用来自动构建源文件列表</h4>
<ul>
<li><p>语法：<strong>aux_source_directory(dir var)</strong></p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">#定义src变量，其值为当前目录下所有的源代码文件</span><br><span class="line">add_subdirectory(src)</span><br><span class="line"># 编译src变量所代表的源代码文件，生成main可执行文件</span><br><span class="line">add_executable(main $&#123;src&#125;)</span><br></pre></td></tr></table></figure></li>
</ul></li>
</ul>
<h2 id="cmake常用变量">CMake常用变量</h2>
<ul>
<li><p>CMAKE_C_FLAGS: gcc编译选项</p></li>
<li><p>CMAKE_CXX_FLAGS: g++编译选项</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#在CMAKE_CXX_FLAGS选项追加-sdt&#x3D;c++11</span><br><span class="line">set(CMAKE_CXX_FLAGS &quot;$&#123;CMAKE_CXX_FLAGS&#125; -std&#x3D;c++11&quot;)</span><br></pre></td></tr></table></figure></li>
<li><p>CMAKE_BUILD_TYPE: 编译类型(Debug Release)</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">#设置编译类型为Debug</span><br><span class="line">set(CMAKE_BUILD_TYPE Debug)</span><br></pre></td></tr></table></figure></li>
<li><p>CMAKE_C_COMPILER: 指定C编译器</p></li>
<li><p>CMAKE_CXX_COMPILER:指定c++编译器</p></li>
<li><p>EXECUTEABLE_OUTPUT_PATH:指定可执行文件的输出路径</p></li>
<li><p>LIBRARY_OUTPUT_PATH:库文件输出的存放路径</p></li>
</ul>

    </div>

    
    
    

    <footer class="post-footer">
          <div class="followme">
  <span>Welcome to my other publishing channels</span>

  <div class="social-list">

      <div class="social-item">
          <a target="_blank" class="social-link" href="/atom.xml">
            <span class="icon">
              <i class="fa fa-rss"></i>
            </span>

            <span class="label">RSS</span>
          </a>
      </div>
  </div>
</div>


        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2024/04/11/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F%E9%9A%8F%E6%83%B3/" rel="prev" title="设计模式随想">
                  <i class="fa fa-angle-left"></i> 设计模式随想
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2024/04/28/CSAPP%E7%AC%94%E8%AE%B0-%E9%93%BE%E6%8E%A5/" rel="next" title="CSAPP笔记-链接">
                  CSAPP笔记-链接 <i class="fa fa-angle-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">

  <div class="copyright">
    &copy; 
    <span itemprop="copyrightYear">2024</span>
    <span class="with-love">
      <i class="fa fa-heart"></i>
    </span>
    <span class="author" itemprop="copyrightHolder">LittleBlackDot</span>
  </div>
  <div class="powered-by">Powered by <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/" rel="noopener" target="_blank">NexT.Gemini</a>
  </div>

<div>
<script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<span id="busuanzi_container_site_pv" style='display:none'>
    本站总访问量 <span id="busuanzi_value_site_pv"></span> 次
    <span class="post-meta-divider">|</span>
</span>
<span id="busuanzi_container_site_uv" style='display:none'>
    有<span id="busuanzi_value_site_uv"></span>人看过我的博客
</span>
</div>

    </div>
  </footer>

  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>
  <div class="sidebar-dimmer"></div>
  <div class="back-to-top" role="button" aria-label="Back to top">
    <i class="fa fa-arrow-up fa-lg"></i>
    <span>0%</span>
  </div>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


  
  <script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/sidebar.js"></script><script src="/js/next-boot.js"></script>

  <script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.4.1/search.js" integrity="sha256-1kfA5uHPf65M5cphT2dvymhkuyHPQp5A53EGZOnOLmc=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>







  




  

  <script class="next-config" data-name="enableMath" type="application/json">true</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.js","integrity":"sha256-MASABpB4tYktI2Oitl4t+78w/lyA+D7b/s9GEP0JOGI="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>



</body>
</html>
